Method, Compressor, Decompressor and Signal Representation for Lossless Compression of Pixel Block Values using Row and Column Slope Codewords

ABSTRACT

The invention relates to compression of a pixel block ( 300 ) of depth values. A reference codeword ( 410 ) is determined as a representation of a reference depth value. A row ( 420 ) and a column ( 430 ) slope codeword are determined as representations of a basic depth slope for the rows ( 310 ) and columns ( 320 ) in the block ( 300 ), respectively. Representations indicating pixel positions where a slope change occurs along at least a portion of a row ( 310 ) or column ( 320 ) is determined for at least a subset of the rows ( 310 ) or columns ( 320 ). A mode codeword ( 440 ) is determined as a representation of a set of multiple slope correction patterns. A respect pattern codeword ( 450 ) is then selected for rows ( 310 ) or columns ( 320 ) as identifier of one of the slope correction patterns.

TECHNICAL FIELD

The present invention generally relates to a lossless compression anddecompression of pixel parameter values, and in particular such acompression and decompression suitable for depth buffer compression anddecompression.

BACKGROUND

The real-time rendering of three-dimensional graphics has a number ofappealing applications on mobile terminals, including games, man-machineinterfaces, messaging and m-commerce. Since three-dimensional renderingis a computationally expensive task, dedicated hardware must often bebuilt to reach sufficient performance. Innovative ways of lowering thecomplexity and bandwidth usage of this hardware architecture are thus ofgreat importance. The main bottleneck, especially for mobile terminals,is memory bandwidth. A common technique for reducing memory bandwidthusage is depth buffer compression.

Primitives, such as triangles, are usually drawn in a non-sorted order.In order to make sure that only the triangles that are closest to theeye are written, a depth buffer is generally used. The depth bufferholds, for each pixel, the depth, i.e. distance to the eye, for thatparticular pixel. Before writing a new pixel, the corresponding depth isfirst read from the depth buffer. The new pixel is only written if thenew depth is smaller than the previously written depth. The new depthvalue must then be written to the depth buffer. This reading and writingof depth values will generate a lot of memory accesses, which limitsperformance.

Depth buffer compression works by dividing the depth buffer into tilesor pixel blocks, and storing the tiles in a compressed format. Whenreading a depth buffer value, the entire depth tile is read anddecompressed. The depth values are then modified, and before writing thetile to memory again, it is compressed. Since rasterization is usuallydone on a per-tile basis, it is often not a problem to read and write anentire tile at once instead of reading and writing on a per-pixel basis.

Since this decompression and compression might happen several times fora particular tile, it is important that the compression is lossless,i.e. non-destructive.

The depth buffer contains the depth of each pixel, and since the sceneis made up of planar triangles, all pixels in a tile that stems from acertain triangle will be collinear. In particular, if all pixels in atile come from the same triangle, all pixels in the tile will becollinear. In such a case, it will be possible to obtain a losslessrepresentation of the tile by just storing the plane equation of thetriangle in question, instead of storing the individual pixel depths.Many depth buffer algorithms work this way. Hasselgren andAkenine-Möller provide an extensive review of the known depth buffercompression schemes in their paper [1].

Hasselgren and Akenine-Möller also present, in the paper [1], animprovement of the prior art schemes that use differential pulse codemodulation (DDPCM). Their key contribution is that, instead of using acorrection value of {−1, 0, 1}, it is possible to get by with only onebit per pixel. The discovery that they made is that, since the slope inthe x-direction is alternating between two values, it is always possibleto use the smaller slope and then use a 1-bit correction value for theslope per pixel.

Compared to the previous DDPCM schemes, where the correction values areone of {−1, 0, 1}, and thus use two bits per pixel to encode, Hasselgrenand Akenine-Möller use a one-bit-per-pixel correction value, thus savingone bit per pixel. This translates to 13 bits saved in a tile of 4×4pixels, or 61 bits saved for an 8×8 tile. However, even with this bitsavings Hasselgren and Akenine-Möller are only able to compress about93% of the possible depth range in a lossless way. If an object comestoo close to the camera or viewer, the depth buffer compressionalgorithm will fail and the depth tiles must be stored uncompressed.

SUMMARY

There is therefore a need of being able to exploit the bits ofcompressed tiles in a more efficient manner in order to be able toincrease the number of tiles that can be compressed in a lossless way,which would lead to lowered memory bandwidth.

The present invention overcomes these and other drawbacks of the priorart arrangements.

It is a general object of the present invention to provide an efficientcompression and decompression of pixel blocks.

It is another object of the invention to provide a compression anddecompression adapted for depth buffer values.

These and other objects are met by the invention as defined by theaccompanying patent claims.

Briefly, the present invention involves compression and decompression ofblocks of pixels having associated pixel parameter values, such as depthbuffer values. The compression involves determining a reference codewordas a representation of a reference pixel parameter value for the block.A row slope codeword is determined as a representation of a basicparameter slope for the rows in the block. Correspondingly, thecompression involves determining a column slope codeword asrepresentation of a basic parameter slope for the columns.

A representation indicating pixel positions where a slope change occursalong at least a portion of a row/column is determined based on at leasta portion of the pixel parameter values of the row/column. Such arepresentation is generated for multiple rows/columns in the block,preferably for all rows/columns. A mode codeword that is arepresentation of a set of multiple slope correction patterns isdetermined. Each such correction pattern is a specific, predefinedrepresentation indicating position-dependent slope correctors applicablealong a row/column. A respective pattern codeword is selected forrows/columns based on the generated position-indicating representations.The pattern codewords are representations of slope correction patternsfrom the pattern set defined by the mode codeword.

In the decompression of a compressed block, a reference pixel parametervalue is determined based on the reference codeword in the compressedblock. A basic parameter slope, such as row and/or column parameterslope, is generated based on a (row and/or column) slope codeword. Themode codeword in the compressed block is employed for providing apattern set comprising multiple slope correction patterns. A row/columncomprising a pixel to be decoded has an associated pattern codeword.This pattern codeword is used for identifying one of the slopecorrection patterns of the provided pattern set. The pixel parametervalue of the pixel can then be calculated using the reference parametervalue, the basic parameter slope and the slope correction pattern.

The present invention also relates to a compressor and decompressor forcompressing pixel blocks and decompressing compressed block,respectively, and a signal representation of a compressed pixel block.

SHORT DESCRIPTION OF THE DRAWINGS

The invention together with further objects and advantages thereof, maybest be understood by making reference to the following descriptiontaken together with the accompanying drawings, in which:

FIG. 1 is a flow diagram of a compression method according to anembodiment of the present invention;

FIGS. 2A and 2B illustrate pixel blocks that can be used according tothe present invention in a row-wise or column-wise compression;

FIG. 3 is a schematic illustration of a compressed representation of apixel block according to an embodiment of the present invention;

FIG. 4 is a flow diagram illustrating an embodiment of the generatingstep of FIG. 1 in more detail;

FIGS. 5A to 5C schematically illustrate an embodiment of generatingdistribution representations in the compression method of the presentinvention;

FIG. 6 illustrates available sets of predefined distribution patternsused according to the present invention;

FIG. 7A illustrates another pixel block that can be used according tothe present invention;

FIG. 7B schematically illustrates an embodiment of handling a row ofpixels in the compression method of the present invention for a pixelblock illustrated in FIG. 7A;

FIG. 8 illustrates a pixel block comprising two planes;

FIG. 9 illustrates other available sets of predefined distributionpatterns used according to the present invention;

FIG. 10 illustrates further available sets of predefined distributionpatterns used according to the present invention;

FIGS. 11A to 11C illustrate yet other available sets of predefineddistribution patterns used according to the present invention;

FIGS. 12A to 12E schematically illustrate embodiments of handling a rowof pixels in the compression method of the present invention for a pixelblock illustrated in FIG. 10;

FIG. 13 is a flow diagram of a decompression method according to anembodiment of the present invention;

FIG. 14 a schematic block diagram of a depth buffer architecture towhich the teachings of the present invention can be applied;

FIG. 15 is a schematic block diagram of a compressor according to anembodiment of the present invention;

FIG. 16 is a schematic block diagram of a representation generator ofthe compressor according to an embodiment of the present invention;

FIG. 17 is a schematic block diagram of a decompressor according to anembodiment of the present invention; and

FIGS. 18A to 18M illustrate examples of possible distribution patternsused according to the present invention for 8-pixel row or columnimplementations.

DETAILED DESCRIPTION

Throughout the drawings, the same reference characters will be used forcorresponding or similar elements.

The present invention generally relates to a lossless compression anddecompression of pixel parameter values, and in particular such acompression and decompression suitable for depth buffer compression anddecompression.

The present invention is well adapted for usage with three-dimensional(3D) graphics, such as games, 3D maps and scenes, 3D messages, e.g.animated messages, screen savers, man-machine interfaces (MMIs), etc.,but is not limited thereto. Thus, the invention could also be employedfor encoding other types of images or graphics, e.g. one-dimensional(1D), two-dimensional (2D) or 3D images.

In the present invention, the compression and decompression collectivelyhandles a plurality of pixels, typically in the form of a block or atile of pixels.

In a preferred embodiment of the invention, a pixel block has the sizeof M×N pixels, where M, N are integer numbers with the proviso that bothM and N are not simultaneously one. Preferably, M=2^(m) and N=2^(n),where m, n are zero or integers with the proviso that m and n are notsimultaneously zero. In a typical implementation M=N and preferred suchblock embodiments could be 4×4 pixels, 8×8 pixels or 16×16 pixels.

The expression pixel or “image element” refers to an element in a blockor encoded representation of a block. This block, in turn, correspondsto a portion of an image, texture or buffer. Thus, according to theinvention, an image element could be a texel (texture element) of a (1D,2D, 3D) texture, a pixel of a (1D or 2D) image or a voxel (volumeelement) of a 3D image. Generally, a pixel is characterized with anassociated pixel parameter value or feature. In a preferred embodimentof the present invention, the pixel parameter value is a depth value orso-called Z value. This feature represents the depth or distance to theeye for the particular pixel and controls which pixels that willactually be displayed during rendering.

Even though the present invention is particularly suitable forcompressing and decompressing such depth values of pixel blocks, theinvention is not limited thereto and may be used in connection withother types of pixel parameter values and features. These include colorcomponent values, such as red (R), green (G) or blue (B) colorcomponents, or a color component in some other color space, such as YUVor YCrCb. Further examples include transparency or alpha value ofpixels.

However, the compression and decompression is adapted for handlingcollinear pixel parameter values, i.e. parameter lying in a plane. Thus,the pixel parameter values of a block to be compressed all lie in asingle plane in a parameter space or lie in one of a set of multipleplanes, typically two planes. This requirement implies that it may bepossible to achieve a lossless compression of the pixel block usingfewer bits than the original number bits of the pixel parameter values.

Furthermore, in the following, the term “image” is used to denote any1D, 2D or 3D image or texture that can be encoded and decoded by meansof the present invention, including but not limited to bump maps, normalmaps, photos, game type textures, text, drawings, high dynamic rangeimages and textures, etc.

Compression

FIG. 1 is a flow diagram illustrating a method of compressing a block ofpixels according to the present invention. The method starts in step S1by determining a reference codeword as a representation of a referencepixel parameter value. This codeword is preferably a representation ofone of the pixel parameter values present in the block to be compressed.In a first embodiment, the reference codeword could be an unquantizedversion of the parameter value. For example, if the particular parametervalue is 230=0000 0000 1110 0110_(bin) (with 24-bit resolution) and thereference codeword has the same bit resolution, the value 0000 0000 11100110_(bin) can be used directly as reference codeword. However, in otherembodiments the original pixel parameter values may have higherprecision than can be represented by the reference codeword. In such acase, the reference codeword could be a representation of a quantized orrounded version of the original pixel parameter value. For example, areference codeword of 0000 0000 1110 0110_(bin) could be used as arepresentation of an original pixel parameter value of 229.8. Also notethat the reference codeword can contain fewer bits than the originalpixel parameter value. For instance, a 21-bit codeword could be used forrepresenting a 24-bit original value, while assuming that the leadingbits are known.

The codeword determining step of S1 preferably involves retrieving thepixel parameter value of a pixel in a selected pixel position in theblock and optionally calculate (quantize) the codeword therefrom or usethe retrieved value directly as reference codeword. The selected pixelposition is preferably a predefined position in the block, implying thatthe same pixel position is used in the codeword determination step S1for all blocks to be compressed according to the present invention. Apreferred position is a pixel positioned in one of the corners of theblock. Traditionally the pixel in the upper left corner is used in thecase of depth buffer value compression in the art. However, theinvention is not limited to that particular pixel position and can useany of the corner pixels or indeed any pixel in the block, though framepixels and in particular corner pixels are preferred. FIGS. 2A and 2Billustrate a 4×4 block 300 of pixels 330 to be encoded. In these figuresthe pixel position used in determining the reference codeword is markedwith a filled circle, i.e. the pixel in the upper left corner.

A next step S2 determines a row slope codeword for the block as arepresentation of a basic parameter slope for the rows of the block. Ina preferred implementation, the pixel parameter values of (at least aportion of) the block are collinear and therefore has the same originalrow slope at least for the original, unquantized parameter values. Forexample, a pixel row could have the following original values [109.8,112.6, 115.4, 118.2]. The slope is here the pairwise difference betweenadjacent parameter values in the row,118.2−115.4=115.4−112.6=112.6−109.8=2.8. The same row slope is validalso for other rows of the block as long as the parameter values arecollinear.

The row slope codeword is preferably a representation of the integerportion of the original row slope, i.e. 2 in the example above. If theoriginal, unquantized parameter values are available in the compression,the codeword determination of step S2 can calculate the differencebetween any pair of adjacent pixel parameter values in any row of theblock. The row slope codeword is then determined as a representation ofthe integer part of the calculated slope (difference).

If the parameter values are quantized, such as rounded into integervalues, another approach is typically taken in step S2. A roundedversion of the parameter values given above would be [110, 113, 115,118]. A pairwise difference between adjacent values in the row wouldhere give a value of 2 or 3. In such a case, the row slope codeword isconsistently determined as a representation of the smallest orconsistently determined as a representation of the largest slope value.The importance here is that either the smallest or the largest slopevalue must be taken for all blocks to be encoded. Preferably, thesmallest calculated slope value is consistently used as a basis for therow slope codeword determining step. This also applies in the case ofnegative slopes. For instance, the slope could be −1.6 in the cases oforiginal values and thereby be −1 or −2 when using the rounded values.In such a case, the smallest value −2 is preferably used as basis forthe row slope codeword determination.

The next step S3 performs a similar procedure but for the columns in theblock. The result is then a column slope codeword that is arepresentation of a basic parameter slope for the columns of the block.This step S3 is performed in the same way as step S2 but now parametervalues in column are used instead of parameter values in a row.

Steps S1 to S3 can be performed in any order or indeed in parallel.

The compression of the pixel block 300 can now be performed row 310 byrow 310, which is schematically illustrated in FIG. 2A or column 320 bycolumn 320, which is illustrated in FIG. 2B. From quality point of view,the two possibilities are equivalent. In the following, the presentinvention is mainly described in connection with a row-by-rowcompression (see FIG. 2A). However, the teaching of the presentinvention can also be applied to a column-by-column compression. In thelatter case, the expression “row” is simply replaced by “column” andvice versa in the following description.

A next step S4 generates a representation indicating pixel positionswhere a slope change occurs along at least a portion of a current row(or column in the case of FIG. 2B). This step S4 can be implemented bynoting at which pixel positions the slope is different from the basicrow slope of the block represented by the row slope codeword determinedin step S2. Thus, assume a row of pixel values [110, 113, 115, 118] asabove and with a basic parameter slope of 2. The difference betweenadjacent parameter values, i.e. slope, is in this example [−, 3, 2, 3].In this case pixel position 1 and 3 have a slope different from two andtherefore a slope change occurs at these two pixel positions. However,the slope at pixel position 2 is equal to the basic row slope and noslope change occurs here. If the basic row slope value is subtractedfrom the above listed slope values we get [−, 1, 0, 1]. As aconsequence, a representation indicating pixel positions where a slopechange occurs along the current row could be in the form of 1 0 1, where1_(bin) signal a slope change, whereas 0_(bin) implies that thedifference between adjacent parameter values at that position is equalto the basic row slope.

The position-indicating representation is preferably generated based onall the pixel parameter values of the row. However, for certainembodiments, it could be enough to merely use a subset of the pixelvalues in the row. These representations could be regarded as indicativeof the relative distribution of parameter values when going along atleast a portion of the row/column.

Step S4 is repeated at least one, which is schematically illustrated bythe line L1. This means that a position-indicating representation isdetermined for at least two rows of the pixel block. In a preferredembodiment, step S4 is though performed for each row of the block.

A next step S5 determines a mode codeword for the block. This codewordis a representation of a set of multiple slope correction patterns. Eachsuch pattern is a specific, predefined representation indicatingposition-dependent slope correctors applicable along a row. Thus, such apattern is a bit sequence with slope correctors applicable, duringdecompression, to the basic row slope to obtain a correct slope valuefor the different pixel positions in the rows. For a four pixel row, thepatterns could be from 000_(bin) up to 111_(bin). There are preferablymultiple different pattern sets available, where each set comprisesdifferent sub-sets of the available slope correction patterns.

In the case the row slope codeword is a representation of the integerportion of the row slope obtainable through usage of the original,unquantized pixel parameter values, the pattern sets can be adapted forhandling different fractional portions of the row slope. For instance, afirst pattern set will be used for the block if the fractional portionof the original row slope is in the interval [0, k₁], a second set isused if the fractional portion is in the interval [k₁, k₂] and so onuntil the last pattern set, which is adapted for taking handling blockswith a fractional slope in the interval [k_(i), 1].

Thus, the mode codeword determining step S5 involves selecting a patternset from the multiple predefined sets. If the original, unquantizedparameter values are available and it is possible to calculate theoriginal, unquantized row slope, the pattern set can be selected basedon the particular fractional portion of the calculated row slope.However, in other applications, only the quantized parameter values areavailable in connection with block compression. In such a case, theparticular pattern set to use is preferably selected based on theposition-indicating representations generated in step S4. Then, at leasttwo or preferably all position-indicating representations are used andcompared to the different slope correction patterns available for thedifferent sets. The set that encompasses patterns corresponding toposition-indicating representations is selected. Each pattern set ispreferably associated with a set identifier. This identifier associatedwith the selected pattern set is then used as mode codeword in step S5.For instance, a 2-bit mode codeword can be used if there are up to fourdifferent available sets, a 3-bit mode codeword can handle up to eightdifferent sets, and so on.

Step S6 determines a pattern codeword as a representation of a slopecorrection pattern from the pattern set represented by the determinedmode codeword. This pattern codeword determination is performed based onthe position-indicating representation generated for the current row instep S4. Thus, step S6 involves selecting one of the slope correctionpatterns from the selected set that corresponds to theposition-indicating representation calculated for the row. The patterncodeword is determined to be an indicator of the selected slopecorrection pattern.

Step S6 is preferably performed for all rows in the block or at leastfor those rows for which a position-indicating representation has beengenerated in step S4, which is schematically illustrated by the line L2.Each such row therefore has an assigned pattern codeword that isassociated with one of the correction patterns in the pattern setrepresented by the determined mode codeword.

The method optionally, but preferably comprises determination of slopeor pixel modifiers that are applicable when stepping down to a next row.Such a slope modifier is a single correction term that can be appliedfor obtaining a correct column slope when stepping down to the next row.For instance, assume that the quantized pixel parameter values of afirst column are [110, 231, 351, 472]. The basic column slope would inthis case be the smallest difference between two adjacent pixel values,i.e. 120. A slope or pixel modifier of 0_(bin) is then assigned thoserows for which the slope is indeed 120 (going from row 1 to 2 in thisexample), while a modifier of 1_(bin) is used for those row transitionsin which the slope is 121 and not 120. In the example here the slopemodifiers would be 1 0 1. If the block comprises N rows, N−1 slopemodifiers are then preferably determined.

The method therefore preferably comprises the additional step ofdetermining, for the at least one row (or column in the case of FIG. 2B)in the block, a slope modifier applicable to the basic parameter slopefor the columns. The modifier determination is furthermore performedbased on at least a portion of the pixel parameter values of a column.The method then ends.

The result of the compression is a compressed representation of theoriginal pixel block. FIG. 3 illustrates such a compressed block 400.The compressed block 300 comprises the reference codeword 410, a rowslope codeword 420, a column slope codeword 430, a mode codeword 440 andmultiple pattern codewords 450, preferably one such codeword 450 foreach row (or column) in the block. The compressed block 400 preferablyalso comprises pixel or slope modifiers 460 for the column direction aspreviously described. It is anticipated by the present invention thatthe actual order of the including components of the compressed block 400may differ from what is illustrated in the figure.

FIG. 4 is a flow diagram illustrating an embodiment of generatingposition-indicating representation in more detail. The method continuesfrom step S3 of FIG. 1. A next step S10 quantizes the original parametervalues unless the parameter values are already quantized. A typicalexample of quantization is rounding the values to integer numbers.Generally, the quantizing involves writing the original parameter valueinto a quantized value having a defined limited bit-size. The quantizedvalue is then preferably the best Q-bit representation of the originalvalue, where Q is the bit-size of the quantized values. A next step S11performs a pair-wise subtraction of neighboring quantized pixelparameter values in a row (or column) and the basic parameter slope forthe rows (or columns). Thus, the calculation involves determiningP_(i+1)−P_(i)−R, where P_(i) is the quantized pixel parameter value atposition i in a row and R is the basic parameter slope for the rows. Themethod then continues to step S5 of FIG. 1 or back to step S10 fordetermining the position-indicating representation for a next row.

FIGS. 5A to 5C illustrate the principles behind determiningposition-indicating representations according to the present invention.A 4-pixel row could, for instance, have the following original parametervalues [109.8, 112.6, 115.4, 118.2]. This would be equivalent to drawinga line with the slope 2.8, as can be seen in FIG. 5A.

In FIG. 5A, the pixels where the midpoint line of the pixel crosses thedrawn line has been marked. The marked pixels also represent the valuesobtained by quantized the original values, i.e. [110, 113, 115, 118].

By removing the integer part of the slope 2.8, namely 2, from theunquantized parameter values, we get the following values: [109.8,110.6, 111.4, 112.2]. This is equivalent of drawing FIG. 5B, where theslope of the line now must be smaller than 1 as only the fractionalslope part remains. In this case, the fractional slope is 2.8−2.0=0.8.

From this diagram of FIG. 5B it is possible to identify those pixelpositions in which a change in the slope occurs. This corresponds tothose positions, for which we have to step up one step when going alongthe row. Pixel 0 is the anchor or reference value and does not have acorrection value. Pixel 1 is one step higher than the previous pixel.This means that a change in row slope occurs at this position andthereby it gets a value of 1_(bin). Pixel 2 is the same height as theprevious value and no slope change is occurs. The pixel therefore gets avalue of 0_(bin). Finally pixel 3 gets a correction value of 1_(bin).FIG. 5C illustrates the final position-indicating representation101_(bin) and it is seen that the representation can be thought of as astep pattern of different segment lengths.

The key to the invention here is to notice that all rows will haveexactly the same fractional slope, in this case 0.8. This means that theonly difference between the rows is the position of the line not itsslope. This would then correspond to different step patterns withdifferent step lengths.

FIG. 6 illustrates all the correction patterns, i.e. position-indicatingrepresentations, which are possible for a row of four pixels. Thepatterns have been organized into four different pattern sets. The firstpattern set has an assigned mode codeword 00_(bin) and includes thepatterns 000_(bin), 001_(bin), 010_(bin) and 100_(bin). These patternscorrespond to segments of length 3 and 4. The mode covers fractionalslopes from 0 to ⅓. A next set has mode codeword 01_(bin) and includesthe correction patterns 101_(bin), 001_(bin), 010_(bin) and 100_(bin).This set includes patterns with segment lengths of 2 and 3 pixels andcovers fractional slopes in between ⅓ and ½. The third set has modecodeword 10_(bin) and comprises the patterns 101_(bin), 110_(bin),010_(bin) and 011_(bin). The patterns have zero or one segment of length1 pixel between segments of length 2 pixels. Fractional slopes in theinterval ½ and ⅔ can be handled with this set. The final set has beenassigned codeword 11_(bin) and comprises the correction patterns101_(bin), 110_(bin), 111_(bin) and 011_(bin). These patterns have oneor two segments of length 1 between segments of length 2 pixels andcover the fractional interval ⅔ to 1.

The prior art DDPCM procedure suggested by Hasselgren and Akenine-Möller[1] spends 15 bits per 4×4 block in their correction matrix. The presentinvention need only, for this block size, a 2-bit mode codeword, four2-bit pattern codewords (one for each row or column) and three 1-bitslope modifiers, which amounts to 13 bit. This means that 2 bits aresaved as compared to the prior art solution. This 2-bit saving can beused for the purpose of reducing the total size of the compressed block.Alternatively if the same total compressed block size as the prior artwould be advantageous, the two free bits can be used to boost theresolution in the reference codeword and/or slope codewords. Such aboosting means that the percentage of blocks that can be compressed in alossless manner increases as compared to usage of the prior arttechniques.

Compression Example

Herebelow follows a compressing example to illustrate the proceedings ofthe present invention. Assume a quantized input pixel block having thefollowing parameter values:

$\begin{bmatrix}110 & 113 & 115 & 118 \\231 & 233 & 236 & 239 \\351 & 354 & 357 & 359 \\472 & 475 & 477 & 480\end{bmatrix}\quad$

First a reference parameter pixel value is selected and the referencecodeword is determined. The codeword can be a bit representation of thepixel value in the upper left corner, i.e. 110. In this example, theblock is compressed row-by-row as illustrated in FIG. 2A. The basic rowparameter slope is defined as the smallest slope when going one step ina row. In this example, the different row slopes are 2 and 3, whichmeans that the row slope codeword is determined as a bit-representationof two. The corresponding column slopes are 120 and 121, which meansthat the column slope codeword is determined as a bit representation of120. Thereafter, pair-wise subtractions are performed, in which aprevious neighboring parameter value in the same row is subtracted fromthe next parameter value. Furthermore, the basic row parameter slope, 2,is subtracted from the resulting difference to obtain theposition-indicating representation. The result for the first row is:

-   -   113−110−2=1    -   115−113−2=0    -   118−115−2=1

The position-indicating representation for that row is 101_(bin).Performing the same procedure for the other three rows gives:

$\begin{bmatrix} - & 1 & 0 & 1 \\ - & 0 & 1 & 1 \\ - & 1 & 1 & 1 \\ - & 1 & 1 & 0\end{bmatrix}\quad$

The relevant pattern set to use for the block is then selected based onthese four position-indicating representations. By consulting FIG. 6, wesee that the pattern set having mode codeword 11_(bin) contains all therequired correction patterns. Particular correction patterns thatcorrespond to the position-indicating representations are thendetermined for the rows. The first row has the representation 101_(bin).This corresponds to correction pattern with pattern codeword 00_(bin) inFIG. 6. The remaining rows have codewords 11_(bin), 10_(bin) and01_(bin).

Finally, the slope modifiers for the columns are determined by apair-wise subtraction of neighboring pixel parameter values in the firstcolumn and by subtracting the basic column parameter slope. The resultbecomes:

-   -   231−110−120=1    -   351−231−120=0    -   472−351−120=1

The slope modifiers are thus 101_(bin). The finally compressed blockthus comprises:

-   -   i) a bit-representation of 110—reference codeword    -   ii) a bit-representation of 2—row slope codeword    -   iii) a bit-representation of 120—column slope codeword    -   iv) 11_(bin)—mode codeword    -   v) 00_(bin), 11_(bin), 10_(bin), 01_(bin)—pattern codewords    -   vi) 101_(bin)—slope modifiers

The gain in employing the present invention as compared to the prior arttechnique in document [1] was 2 bits for a 4×4 block. This might seem tobe only a minor advantage. However, one should bear in mind that this2-bit saving comes for free without any reduction in compressionquality. For larger block sizes, such as 8×8 blocks, the gain is vastlyincreased as compared to the prior art.

Compared to 4×4 blocks, we require more pattern modes for 8×8 blocks toallow for more fractional slopes. The reason for that is that, sinceevery row now have eight pixels instead of four, a finer grainedrepresentation is possible.

An analysis of the possible correction patterns shows that eight patternmodes would cover all cases:

-   Mode A: Correction patterns with segments of length 1 or 2, (four or    more consecutive 1's)-   Mode B: Correction patterns with segments of length 1 or 2, (three    or four consecutive's)-   Mode C: Correction patterns with segments of length 1 or 2, (two or    three consecutive 1's)-   Mode D: Correction patterns with segments of length 1 or 2, (one or    two consecutive 1's)-   Mode E: Correction patterns with segments of length 1 or 2, (zero or    one consecutive 1's)-   Mode F: Correction patterns with segments of length 2 or 3.-   Mode G: Correction patterns with segments of length 3, 4 or 5,-   Mode H: Correction patterns with segments of length 5, 6, 7 or 8.

For all these modes, only four bits are necessary to encode the entirerow of eight pixels, see Annex. Thus, in an 8×8 block, the mode codewordbecomes 3 bits, the pattern codewords are 4 bits. This means that,besides the reference codeword, row and column slope codewords, thecompressed 8×8 block comprises 3+8×4+7=42 bits, where the last 7 bitsare seven 1-bit slope modifiers for the first column. This should becompared to the prior art solution in document [1], which requires 63bits for their correction matrix. As a consequence, 21 bits are savedper compressed block and can be used for boosting the resolution in thereference codeword, row slope codeword and/or column slope codeword.Alternatively, the total size of the compressed block can be reduced.

Whereas this solution is theoretically sound, it might not be optimalfrom an implementation point of view. To choose between 16 7-bitpatterns (correction patterns) might become rather big in terms ofsurface area. The second thing is that we actually do not need so manyextra bits in the 8×8 case. If we encode all parameters with fullresolution, we get:

Reference codeword: 24 bitsRow and column slope codewords: 2×25 bitsMode codeword: 3 bitsPattern codewords: 8×4 bitsSlope modifiers 7 bitsTotal: 116 bits

This is much less than 128, and therefore it may make sense to use alittle more inefficient encoding in order to ease the implementationburden. The desired bit-size of the compressed block is generallydefined by the bandwidth of the bus used in the depth bufferarchitecture. A compressed block is preferably fetched in a singlememory access or in as few as possible such accesses. Today, busbandwidths for depth buffer architectures are typically 64 or 128 bits.As a consequence, it may be better to have a compressed block size of128 bits or slightly less as compared to 116 bits as the 116-bit blockwill require the same number of memory accesses as a 128-bit block.However, if the implementation burden in terms of silicon area issignificantly higher for the 116-bit version than the 128-bit version,the latter is most likely desirable.

An alternative is to encode the 8 pixel row (7 correction bits) as two 4pixel rows (3 correction bits plus a 1-bit slope modifier). Then we canuse the same encoding as in the 4×4 case. We then need 5 bits per row aswe need two 2-bit pattern codewords per row plus a 1-bit slope modifier.An 8×8 block would be coded using:

Reference codeword: 24 bitsRow and column slope codewords: 2×25 bitsMode codeword: 2 bitsPattern codewords: 8×5 bitsSlope modifiers 7 bitsTotal: 123 bits

Which is still under the budget of 128 bits, if that is regarded as apreferred compressed block size.

In such a case step S4 of FIG. 1 involves generating, for a row/columnand based on a first portion of the pixel parameter values of therow/column, a first position-indicating representation. The step S4 alsocomprises generating, based on a second (remaining) portion of the pixelparameters of the row/column, a second position-indicatingrepresentation. Step S6 then comprises determining a pattern codewordfor each of the two pixel portions per row/column.

In the above-presented examples of the present invention, all pixelparameter values of the block have been in one plane. This covers verymany different blocks in a depth buffer. However, sometimes two or moretriangles can lie at least partly inside a given block. In such a case,the pixel parameter values of the block will belong to one of multipledifferent planes. A vast majority of the blocks can be handled if oneplane per block or two planes per block can be allowed. In thefollowing, such a two planes per block solution is presented. Thesolution assumes that a line can be used for providing a partitioningbetween the two planes. Using a line for partitioning does not cover allcases, such as when the tip of a triangle is inside the block, and suchtiles must be left uncompressed. However, most cases can be handledusing this simple partitioning. As is illustrated in FIG. 8, the pixelsare divided into two partitions using a straight line, where a firstpixel partition lie in a first plane and the other partition lie in asecond plane. Note that the present invention is not limited to theparticular partitioning illustrated in FIG. 8 but can handle any blockhaving two planes which can be separated by a line in the block.

It would generally not be possible to have the same pattern mode for thetwo planes depending on the actual pixel parameter values. This is dueto the fact that the pattern mode depends on the fractional slopes,which typically will be different for the two planes.

The line can either use the top left pixel (marked with filled circle)and bottom right pixel (marked with filled circle) as referenceparameter values or anchor points, or the top right and bottom left. Onebit, denoted diagonal bit, is stored in the compressed block to choosebetween these two configurations. The partitioning is preferably encodedin the same way as taught by Hasselgren and Akenine-Möller [1]. Briefly,we compute the position-indicating representation for at least a portionof the row or column. If the difference between the rounded pixelparameter values of two neighboring pixels of the row or column portionexceeds the basic row (column) parameter slope with more than one, wehave reached a break point. The horizontal (vertical) coordinate of thatpixel is then stored. We only store the first such break point alongeach row or column. If a break point is found while traversing along acolumn, rather than a row, then all remaining rows are given a breakpoint coordinate of zero.

In FIG. 8 the partitioning is marked with a thick jagged line. Thus, inthe example, the first row belongs completely to the leftmost plane,whereas for the second line, the first 7 pixels belong to leftmost planeand the last pixel belongs to rightmost plane, and so on.

In order to save bits compared to just storing the bit pattern above, weneed to be able to store two segments per row (or column if column-wisecompression is used) whose lengths sum to 8. To do so, we introduce anumber of pattern modes for 3, 5 and 6 pixels.

FIG. 9 is an illustration of the correction pattern sets available forrow segments of three bits. As can be seen in the figure, there are twopattern modes, each comprising three correction patterns: 00_(bin),01_(bin), 10_(bin) for mode 0_(bin) and 11_(bin), 01_(bin), 10_(bin) formode 1_(bin)

Since there are three patterns in each set, a 2-bit pattern codewordwould be required. However, as is described further below, it ispossible to store the mode codeword and pattern codeword in theparticular 3-pixel row portion more efficiently.

FIG. 10 illustrates the six pattern sets available in the case of a rowportion of 5 pixels. Each such pattern set comprises five differentcorrection patterns as illustrated in the figure. A pattern codewordsize of three bits can be used for representing the different correctionpatterns. However, also here a more efficient way is possible, as isshown further below.

FIGS. 11A-11C collectively illustrate the seven pattern sets with sixslope correction patterns per set that are available for a row portionof six pixels.

Looking at FIG. 8, there are nine possibilities to partition a row. Thefirst row, for instance, has 8 pixels assigned to the leftmost plane andnone assigned to the rightmost plane. The last row has one pixelassigned to the leftmost plane and seven to rightmost plane. The last(ninth) combination, which is not shown, is to have all eight pixelsassigned to the rightmost plane.

8 Pixels Left—0 Pixels Right Partitioning

As is seen in FIG. 12A, with 8 pixels 310 on the left side of theborder, we handle the row 310 as a 6-pixel row portion 312 plus one3-pixel row portion 314. Thus, the current row needs one 1-bit slopemodifier, a 3-bit first pattern codeword for the 6-pixel row portion 312and a 2-bit second pattern codeword for the 3-pixel portion 314, givinga total of six bits.

7 Pixels Left—1 Pixel Right Partitioning

This scenario is illustrated in FIG. 12 B. Again, we use one bit for theleft slope modifier (y-component), and a 3-bit pattern codeword for the6-pixel row portion 312 plus a single slope modifier for the remainingpixel 330 to the left of the border. To the right of the border, we havea single slope modifier (y-component). In total 1+3+1 bits for the leftside and 1 for the right side, yielding 6 bits in total.

6 Pixels Left—2 Pixels Right

As can be seen in FIG. 12C, here we use one bit for the left slopemodifier (y-component) and a 3-bit pattern codeword for the 6-pixel rowportion 312 to the left of the border. To the right, we have a slopemodifier (y-component) and a 1-bit slope modifier for the single pixel330. Thus, 1+3 bits to the left and 1+1 to the right, which gives atotal of six bits.

5 Pixels Left—3 Pixels Right

As is illustrated in FIG. 12D, a straightforward solution would be touse a 5-pixel row portion 310 to the left of the border and 3-pixelsegment 312 to the right.

However, one problem with this is that the 5-pixel chunk is representedby a quinary variable that needs three bits if stored independently.Also, the 3-segment is a ternary variable, needing two bits. Takentogether with the two slope modifier (y-component) bits, this is sevenbits. This is inconvenient as all other combinations can be managed withonly 6 bits. However, it is actually possible to reduce this bitutilization for the present case.

In such a case, the quinary variable is stored together with the ternaryvariable. Since 5×3=15<16, we only need four bits to store bothsegments. For instance, the encoding of Table I could be used:

TABLE I collective coding of 3 and 5 slope correction patterns Code5-pixel pattern 3-pixel pattern 0000_(bin) 000_(bin) 00_(bin) 0001_(bin)001_(bin) 00_(bin) 0010_(bin) 010_(bin) 00_(bin) 0011_(bin) 011_(bin)00_(bin) 0100_(bin) 100_(bin) 00_(bin) 0101_(bin) 000_(bin) 01_(bin)0110_(bin) 001_(bin) 01_(bin) 0111_(bin) 010_(bin) 01_(bin) 1000_(bin)011_(bin) 01_(bin) 1001_(bin) 100_(bin) 01_(bin) 1010_(bin) 000_(bin)10_(bin) 1011_(bin) 001_(bin) 10_(bin) 1100_(bin) 010_(bin) 10_(bin)1101_(bin) 011_(bin) 10_(bin) 1110_(bin) 100_(bin) 10_(bin) 1111_(bin)not used not used

Table I refers to the slope correction patterns illustrated in FIGS. 9and 10.

In this way, we need two bits for the slope modifier (y-components) andfour bits for the pattern codewords, yielding six bits in total.

4 Pixels Left—4 Pixels Right:

This is a simple case, we can use 4-pixel patterns for both pixel rowportions 312, 314 on either side of the border as illustrated in FIG.12E.

Thus 1 bit for the slope modifier (y-component) and 3 bits for thepattern codeword on the left side, and likewise on the right side. Intotal six bits.

For those cases with 3, 2, 1 and zero pixels on the left side of theborder of a row and 5, 6, 7 and 8 pixels on the right side, the samecoding as was described above is utilized though the two pixel portionsare exchanged.

Also note that, even though we can use different row segment lengths fordifferent rows, we can use the same mode for all rows. However, asituation can happen where a row comprises a 6-pixel row segment andanother row of the same plane contains a 3-pixel row segment and, the6-pixel row segment need mode 110_(bin). For 3-pixel row portions weonly have two modes 0_(bin) and 1_(bin) to choose from. In such a case,the selection of mode (codeword) and pattern set can therefore beperformed according to Table II below. In Table II, the different modeslisted for the chunk lengths corresponds to the numbering illustrated inFIGS. 6, 9, 10 and 11A to 11C.

TABLE II Mode selection Mode codeword stored in block 000 001 010 011100 101 110 Mode 3-pixel 0 0 0 0 1 1 1 used in chunk decom- 4-pixel 0000 00 01 10 11 11 pression chunk 5-pixel 000 000 001 010 011 100 101chunk 6-pixel 000 001 010 011 100 101 110 chunk

Thus we only need to store one mode codeword per plane using three bits.Since we have two planes, this means 6 bits for the row codewords. Intotal, we need six bits per row as was described above and we have 8rows, giving 8×6=48 bits for the pattern codewords and slope modifiers.However, we do not need a slope modifier for the top left and bottomright y-coordinates (or top right and bottom left), yielding 46 bits forthe pattern codewords and slope modifiers. Together with the modecodewords, this amounts to 46+6=52 bits. This should be compared to thematrix-based solution presented in document [1], which requires 62 bits.Thus, the present invention achieves a bit saving of 10 bits as comparedto the prior art per block having two planes.

Looking at the 192-bit version of the 2-plane 8×8 system from document[1], the following bit layout is presented:

Diagonal bit: 1 bit

Anchor points: 21+22=43 bitsDeltas: 4×15=60 bitsPartitioning bits: 26 bitsCorrection bits: 62 bitsTotal: 192 bits

Using our invention, we could code the correction bits using 52 bitsinstead of 62. If a similar total bit size is desired for the block, apossible bit distribution could then be as follows:

Diagonal bit: 1 bit

Reference codewords: 2×24=48 bitsRow slope codewords: 2×16=32 bitsColumn slope codewords: 2×16=32 bitsPartitioning bits: 26 bitsCorrection bits*: 52 bitsTotal: 191 bits

-   -   Correction bits represent mode codewords, pattern codewords and        slope modifiers.

In this illustrative example, the number of bits spent on the referencecodeword and the slope codewords has been increased compared to document[1]. Alternatively, more bits can be spent on the slope codewords withonly a slight or no increase in the number of bits spent on thereference codeword. In any case, the increased number of bits for theother parameters means that the present invention is able to compress ahigher percentage of the blocks in the depth buffer, meaning that memorybandwidth will be lowered.

Compared to the 4×4 system in document [1], the present invention hasimproved the one-plane mode with two bits, or 3% of the bits. These twobits can be used to extend the range of some parameters, making itpossible to compress a higher percentage of the tiles, thus loweringmemory bandwidth requirements. Compared to the 8×8 system in document[1], the present invention has improved the one-plane mode with 14 to 20bits, or 11-16% of the bits. The one-plane mode can therefore now handleall possible one-plane blocks, increasing the percentage of tiles thatcan be compressed using this mode. The two-plane mode is improved by 10bits, or 8% of the bits. These bits are also spent on improving therange of the parameters so that a higher percentage of the blocks can becompressed.

Thus, the present invention is able to compress a block of M×N pixels bydetermining the reference codeword, the row slope codeword, the columnslope codeword and a modifier codeword, where the modifier codeword is arepresentation of multiple slope modifiers or correctors applicable toat least one of the basic row parameter slope and the basic columnparameter slope. This modifier codeword collectively represents the modecodeword, the pattern codewords and the slope modifiers. In clearcontrast to the prior art techniques, the present invention candetermine such a modifier codeword to have total length of fewer thanM×N−1 bits. For example, Hasselgren and Akenine-Möller need 15 bits forrepresenting their correction matrix with a 4×4 block, while the presentinvention only needs 13 bits. Correspondingly, the prior art needs atleast 63 bits for the correction matrix with an 8×8 block and thepresent invention can handle such a block with 43 bits.

Briefly, returning to FIG. 1. If a block comprises two planes asdescribed above, step S1 comprises determining a first referencecodeword for the pixels of the first plane and determining a secondreference codeword for the pixels of the second plane. The two codewordspreferably represents the pixel parameter values at positions in the topleft corner and the bottom right corner or the top right corner and thebottom left corner of the block. Correspondingly, the steps S2 and S3comprise determining a respective row and column slope codeword for eachof the two planes in the block. These steps are performed as previouslydescribed but using pixels belonging only to the respective plane in theblock.

Step S4 comprises generating, for a row or column and based on a firstportion of the pixel parameters of the row/column, a firstrepresentation indicating pixel positions where a slope change occursalong the first row/column portion. Step S4 also involves generating,for the row/column and based on a second portion of the pixel parametersof the row/column, a second representation indicating pixel positionswhere a slope change occurs along the second portion. In this case, thefirst row/column portion belongs to the first plane and the secondrow/column portion belongs to the second plane. This step S4 ispreferably repeated for all rows/columns in the block. Note that for oneof the rows/columns, all pixels may belong to only one of the planes. Insuch a case, a single position-indicating representation is thengenerated for that row/column.

Step S5 determines a first mode codeword for the first plane in theblock and a second mode codeword for the second plane. The codeworddetermination is preferably performed based on the generatedposition-indicating representations for the rows/columns/belonging tothe different planes and preferably based on Table II listed presentedabove. In most practical cases, the two mode codewords will havedifferent bit values and therefore represent different pattern sets.

Step S6 determines pattern codewords for the different row/columnportions as representations of the slope correction patterns selectedfrom the pattern set used for each plane in the block. Thus, the firstplane generally can select correction patterns from a first pattern set,while slope correction patterns from a second, different pattern set areavailable for the row/column portions of the second plane. The patterncodeword determination is performed based on the position-indicatingrepresentations generated for the different row/column portions. Notethat the complete block can be encoded in a single operation so that thetwo pattern codewords are generated together.

Finally, the slope modifiers are determined for the two planes basicallyby performing the previously described procedure once per plane.

The method illustrated in FIG. 1 also involves determining a partitionpixel of a row/column. The portion of the row/column belonging to thefirst plane and the portion of the row/column belonging to the secondplane can then be defined based on the partition pixel. Such a partitionpixel is preferably determined for multiple of the rows/columns in theblock.

Decompression

FIG. 13 illustrates a flow diagram illustrating a method ofdecompressing a pixel from a compressed pixel block. The method startsin step S20, where a reference pixel parameter value is generated basedon the reference codeword. In a typical implementation, there is aone-to-one relationship between the reference value and the codeword andstep S20 merely involves retrieving the bits corresponding to thereference codeword from the compressed block. However, in otherapplications, the reference value could be obtained by, for instance,expanding the X bits of the reference codeword to a Y-bit value, whereX≠Y, e.g. by copying the sign bit to get a Y-bit value or by adding apre-defined bit word, such as a word of only 1_(bin), as the mostsignificant bits to the X-bit codeword to get the Y-bit value.

A basic parameter slope is determined in step S21. This step can involvedetermining a basic row parameter slope based on the row slope codewordin the block, determining a basic column parameter slope based on thecolumn slope codeword, but preferably involves determining both the rowand column parameter slope. This generation can be performed by a simplebit-retrieving process or an expanding process as mentioned above forthe reference value.

A next step S22 provides a set of correction patterns based on the modecodeword in the compressed block. Each row/column of the block isassociated with a pattern codeword that is used in step S23 forselecting one of the slope correction patterns in the pattern setprovided in step S22.

The steps S20-S22 can be performed in any order or indeed in parallel.

The parameter value for a pixel in the block is then calculated in stepS24 based on the reference pixel parameter value from step S20, thebasic parameter slope from step S21, i.e. the basic row parameter slopeand/or the basic column parameter slope, and the selected slopecorrection pattern.

Optionally, and depending on the particular position of the pixel in theblock one or more slope modifiers that are applicable to the basiccolumn/slope parameter slope can be used in the value calculation ofstep S24.

The method then ends.

The correction pattern selected in step S23 comprises multiple slopecorrectors. The particular slope corrector(s) to use in the parametervalue calculation of step S24 depends on the position of the pixel in arow or column of the pixel block.

The following equation 1 can be used for representing the calculation ofthe pixel parameter value of step S24 in the case of a row-wisedecompression, see FIG. 2A:

$\begin{matrix}{{{Value}\left( {x,y} \right)} = {R + {x \times \Delta^{x}} + {y \times \Delta^{y}} + {\sum\limits_{i = 0}^{x}P_{i}^{x}} + {\sum\limits_{j = 0}^{y}S_{j}^{y}}}} & (1)\end{matrix}$

where Value(x, y) represents the calculated parameter value at pixelposition (x, y) in the block, x=0, 1, M and y=0, 1, N (M, N are integernumbers with the proviso that both M and N are not one), R is thereference parameter value, Δ^(x) is the basic row parameter slope, Δ^(y)is the basic column parameter slope, P_(i) ^(x) is the slope correctorat pixel position i in a row and obtained from the slope correctionpattern, S_(j) ^(y) is the slope modifier assigned to row j. In equation1 P₀ ^(x)=0 and S₀ ^(y)=0. In the case of a column-wise decompression,see FIG. 2B, equation 1 is rewritten and becomes:

$\begin{matrix}{{{Value}\left( {x,y} \right)} = {R + {x \times \Delta^{x}} + {y \times \Delta^{y}} + {\sum\limits_{i = 0}^{y}P_{i}^{y}} + {\sum\limits_{j = 0}^{x}S_{j}^{x}}}} & (2)\end{matrix}$

where P_(i) ^(y) is the slope corrector at pixel position i in a columnand obtained from the slope correction pattern, S_(j) ^(x) is the slopemodifier assigned to column j. In equation 2 P₀ ^(y)=0 and S₀ ^(x)=0.

Decompression Example

For example, assume the following compressed block representation:

Reference codeword: 0000 0000 0010 0100 0110 1001Row slope codeword: 0 0000 0000 0000 0001 1011 0000Column slope codeword: 1 1111 1111 1111 1111 1001 0111Mode codeword: 10Pattern codewords: 00 01 11 01Slope modifiers: 1 0 1The reference parameter value is then: 9321Basic row parameter slope: 432Basic column parameter slope: −105

The particular pattern set to use is pattern 2 (10_(bin)) from FIG. 6.In the first row, the correction pattern should be 1 0 1. The parametervalues of the first row are then:

Value(0,0)=9321 Value(1,0)=9321+432+1=9754 Value(2,0)=9754+432+0=10186Value(3,0)=10186+432+1=10619

The correction pattern for the second row should be 1 1 0 as the patterncodeword is 01_(bin) for that row. The parameter values of the secondrow become:

Value(1,0)=9321−105+1=9217 Value(1,1)=9217+432+1=9650Value(1,2)=9650+432+1=10083 Value(1,3)=10083+432+0=0515

A similar procedure can then be conducted for the remaining rows.

Implementation Aspects

FIG. 14 is a schematic overview of a depth buffer architecture 1, towhich the teachings of the present invention can be applied. Thearchitecture comprises a random access memory (RAM) 50 for storing pixelblocks comprising, among others, depth values. A depth unit 10 comprisesa decompressor 200 according to the present invention for decompressingcompressed blocks fetched from the RAM 50. The decompressed or decodedblocks are temporarily stored in an associated tile cache 14 of thedepth unit 10. A compressor 100 according to the present invention isalso provided in the depth unit 10 for compressing pixel blocks presentin the cache 14 for storage in the RAM 50.

In a preferred embodiment, the depth unit 10 also comprises a tile tablecache 12. This table cache 12 store header information associated withthe pixel blocks but kept separately from the depth buffer data. Thetile table entries typically contains flags signaling whether theassociated pixel block is stored in uncompressed form or in a compressedform in the RAM 50. In the latter case, the flag preferably also signalsthe size of the compressed block, as different compressed blocks canhave different total bit lengths. For example, a 2-bit flag can be usedfor signaling uncompressed block, compressed with 75% of original size,compressed with 50% of original size or compressed with 25% of originalsize.

A rasterizer 20 is connected to the depth unit 10 and performs theactual rasterization of pixels. The rasterizer 20 is connected to one ormultiple pixel pipelines 30 that are employed for computing the depthand color of a pixel. Each pixel pipeline 30 is connected to a depthtesting unit 40 responsible for discarding pixels that are occluded,i.e. having a larger depth value, by previously drawn geometry.

Compressor

FIG. 15 is a schematic block diagram of a compressor 100 according tothe present invention. The compressor 100 comprises a referencequantizer 110 arranged for determining a reference codeword as arepresentation of a reference pixel parameter value for a pixel block tobe compressed. A row slope quantizer 120 determines a row slope codewordfor the block as a representation of a basic parameter slope for therows in the block as previously described. A corresponding column slopequantizer 130 is arranged for determining a basic parameter slope forthe block columns.

The compressor 100 also comprises a representation generator 140 forgenerating, for each row/column in at least a portion of the block,preferably all rows/columns in the block, a position-indicatingrepresentation. The generator 140 preferably performs the representationgeneration based on at least a portion of the pixel parameter values of(the portion of) the row/column. A mode selector 150 is provided in thecompressor 100 for determining a mode codeword as a representation of aset of multiple slope correction patterns of specific, predefined slopecorrectors applicable along a row/column. The mode selector 150preferably performs a selection of such a set from multiple definedpattern sets based on the position-indicating representations generatedby the generator 140. Once such a pattern set has been selected, themode selector 150 provides the mode codeword as a representation of theselected pattern set.

A pattern manager 160 is arranged connected to the mode selector 150 fordetermining, for at least one row/column, preferably all rows/columns inthe block, a pattern codeword as a representation of one of the slopecorrection patterns in the pattern set selected by the mode selector150. The manager 160 is also connected to the representation generator140 and uses the particular position-indicating representation for therows/columns in deciding which slope correction patterns of the set touse for the different rows/columns.

Though, not illustrated in the figure, the compressor 100 preferablyalso comprises a modifier generator for generating at least one slopemodifier applicable to the basic column/row parameter slope duringdecompression.

As has been described in the foregoing, the pattern manager 160 canactually determine two pattern codewords per block row/column, inparticular if an 8-pixel row/column is managed as two 4-pixel chunks.Furthermore, in the case the pixels in the block are not collinear butinstead belongs to one of two planes, the quantizer 110 determines afirst and a second reference codeword, i.e. one for each plane in theblock. The slope quantizer 120, 130 likewise determines a first andsecond row and column slope codeword, respectively. The representationgenerator 140 will determine two position-indicating representations forsome rows/columns in the block, while for others it only determines onesuch representation depending on how many bits respective row/columnchunk comprises. The mode selector 150 determines a first mode codewordfor the first plane and a second mode codeword for the second plane. Thepattern manager 160 then selects pattern codewords representing slopecorrection patterns of the set defined by the first mode codeword forrow/column chunks present in the first plane and selects patterncodewords representing slope correction patterns of the set defined bythe second mode codeword for the row/column chunks of the second plane.

The units 110 to 160 of the compressor 100 may be provided as software,hardware or a combination thereof. The units 110 to 160 may beimplemented together in the compressor 100. Alternatively, a distributedimplementation is also possible with some of the units providedelsewhere in the depth buffer architecture.

FIG. 16 is a schematic block diagram of an embodiment of arepresentation generator 140. This generator 140 comprises an optionalvalue quantizer 142 arranged for quantizing, e.g. rounding, originalparameter values into quantized values. If the input parameter valuesare already quantized, this unit 142 can be omitted. A calculator 144 isarranged in the generator 140 for subtracting, for each pixel in atleast a portion of a row/column, the quantized parameter value of apreceding pixel in the row/column or the reference parameter value andthe basic parameter slope for the rows/columns from the quantizedparameter value of the current pixel. Once this procedure is performedfor all pixels in the row/column (portion), the position-indicatingrepresentation is determined.

The units 142 and 144 of the representation generator 140 may beprovided as software, hardware or a combination thereof. The units 142and 144 may be implemented together in the representation generator 140.Alternatively, a distributed implementation is also possible with someof the units provided elsewhere in the compressor.

Decompressor

FIG. 17 is a schematic block diagram of a decompressor 200 according tothe present invention. The decompressor 200 comprises a referencegenerator 210 for generating a reference pixel parameter value based ona reference codeword in a compressed pixel block. The generator 210 canbe configured for simply retrieving the bit-sequence of the codeword forproviding the reference value or further process the bit-sequence, suchas expand it, to get the target value. A slope generator 220 is providedin the decompressor 220 for determining a basic parameter slope based ona slope codeword of the compressed block. In a first embodiment, thegenerator 220 only determines a basic row slope based on a row slopecodeword. A second embodiment involves determining a basic column slopeusing a column slope codeword.

However, in a third and preferred embodiment, the slope generator 220determines both a basic row slope and a basic column slope based on rowand column slope codewords, respectively.

The decompressor 200 also comprises a set provider 230 for providing aset of multiple slope correction patterns based on a mode codeword ofthe compressed block. The provider 230 preferably selects the set from astorage location (not illustrated) containing multiple different suchpattern sets.

A pattern selector 240 is arranged for selecting a slope correctionpattern from the provided set based on a pattern codeword associatedwith the row/column containing a pixel to be decoded. A value determiner250 is connected to the reference generator 210, the slope generator 220and the pattern selector 240. The determiner 250 calculates the pixelparameter value for the pixel based on the reference parameter valuefrom the reference generator 210, the basic (row and/or column)parameter slope from the slope generator 220 and the slope correctionpattern from the selector 240. The determiner 250 can be implemented toperform any of the calculations presented in equation 1 or 2 above todetermine the pixel parameter value. In an alternative calculation, thedeterminer 250 simply adds the basic parameter slope and a slopecorrector selected from the slope correction pattern to a pixelparameter value determined by the determiner 250 for a previousneighboring pixel the row/column or to the reference pixel parametervalue. In such a case, the decompressor 200 may comprise a modifierselector 260 arranged for selecting a particular slope corrector fromthe pattern based on the position of the current pixel in the block orin a row/column of the block.

Depending on whether the block comprises pixels belong to differentplanes or whether a row/column is handled as two row/column chunks, thereference generator 210 can determine two basic reference values (onefor each plane), the slope generator 220 generates two row and twocolumn parameter slopes (one row and column slopes per plane), the setprovider 230 provides two pattern sets (one for each plane), the patternselector 240 selects one or two slope correction patterns per row/column(depending on the partition position).

The units 210 to 260 of the decommpressor 200 may be provided assoftware, hardware or a combination thereof. The units 210 to 260 may beimplemented together in the decompressor 200. Alternatively, adistributed implementation is also possible with some of the unitsprovided elsewhere in the depth buffer architecture.

It will be understood by a person skilled in the art that variousmodifications and changes may be made to the present invention withoutdeparture from the scope thereof, which is defined by the appendedclaims.

REFERENCES

-   [1] Haselgren and Akenine-Möller, “Efficient Depth Buffer    Compression”, Graphics Hardware, 2006, pp. 103-110

ANNEX

This annex provides information of determining pattern codewords for ablock having eight pixels per row or column. It was previously disclosedthat there are eight different modes (mode A to H) having correctionpatterns of different segment lengths.

Mode A

This mode relates to correction patterns having segments of length twopixels and segments of length one pixel, where there are four or moresegments of length one between the segments of length two. The first 3bits represents the position of the first 2-pixel segment along the rowor column. If there is no 2-pixel segment, position 7 will be used. Thelast bit tells if there are four segments of length one before the nextsegment of length two (“0_(bin)”), or if there are five or more segmentsof length one before the next segment of length two (“1_(bin)”).Depending on the position of the first 2-segment, this bit may beunnecessary. In such a case, the bit can be omitted or set to anarbitrary value. FIG. 18A schematically illustrates this scenario with acorrection pattern of 1111011_(bin). The 2-pixel segment occurs at pixelposition number five in the row. As a consequence, the first three bitsof the pattern codeword can be set to 101_(bin)=5. The last bit can beomitted and 101_(bin) can be used as representation of the correctionpattern 1111011_(bin). Alternatively, an arbitrary bit can be added and1010_(bin) or 1011_(bin) can be used as a representation of thecorrection pattern 1111011_(bin).

Another example is in FIG. 18B. Here the first three bits of the patterncodeword is 010_(bin), indicating that the first 2-pixel segment is atposition 2. Since it does not matter if four or more one-segments followthis two-segment, the last bit of the pattern codeword can be omitted orset to an arbitrary value.

A third example is the pattern 0111110_(bin) in FIG. 18C. Here, thefirst three bits are 000_(bin) to indicate that the first 2-pixelsegment is at position 0. The last bit is 0, indicating that there arefour 1-pixel segments before the next two-segment. Hence, the patterncodeword 0000_(bin) can be used to represent the pattern 011110_(bin).This principle can then be extended to other pixel positions of thefirst 2-pixel segment of this mode.

Mode B

The mode encompasses correction patterns with segments of length one ortwo pixels and having three or four consecutive 1-pixel segments. A4-bit pattern codeword can be used for representing the differentcorrection patterns of this mode. Again, three of the four bits areemployed for defining the position of the first 2-pixel segment in therow or column. For FIG. 18C this would be position 0 and the 3-bitposition representation is therefore 000_(bin). A single bit is used fordiscriminating whether the first 2-pixel segment is directly followed bythree or four 1-pixel segments. In FIG. 18C, there are four suchsegments, meaning that the complete pattern codeword would be 0001_(bin)in this case, where the last 1_(bin) indicates that there are four1-pixel segments. Alternatively, since there are only eight possiblecorrection patterns in mode B, a 3-bit pattern codeword could be used.

Mode C

Mode C relates to correction patterns with segment lengths of one or twopixels and having two or three consecutive 1-pixel segments between the2-pixel segments. A 4-bit pattern codeword is able to represent thecorrection patterns available in mode C. Three of the four bits arededicated for representing the position of the first 2-pixel segment inthe row or column. The remaining bit is used for signaling whether thereare two or three consecutive 1-pixel segments before the next 2-pixelsegment in the row or column. FIG. 18D illustrates the correctionpattern 0111011_(bin). The position of the first 2-pixel segment ispixel number zero and this 2-pixel segment is followed by two 1-pixelsegments before the next 2-pixel segment. The pattern codeword couldtherefore be 0000_(bin) in this case. Note here that it is not necessaryto specify the number of one-segments after the second 2-pixel segment,since it will not affect the correction pattern. Alternatively, sincethere are only eight possible correction patterns in mode B, a 3-bitpattern codeword could be used.

Mode D

This mode refers to correction patterns with segment lengths of one ortwo pixels and having one or two consecutive 1-pixel segments. Two bitsof a O-bit pattern codeword are used for defining the number ofconsecutive 1-pixel segments that precede the first 2-pixel segment inthe row or column (00_(bin)-11_(bin) for discriminating between zero tothree 1-pixel segments). A next bit signals whether the first 2-pixelsegment is followed by one or two consecutive 1-pixel segments and thefinal bit defines whether a second 2-pixel segment is followed by one ortwo consecutive 1-pixel segments, see FIG. 18E. The figure illustratesthe correction pattern 0110110_(bin). There are zero 1-pixel segmentsbefore the first 2-pixel segment, giving 00_(bin). There is a single1-pixel segment following both the first and second 2-pixel segments,resulting in, for instance, 0_(bin) and 0_(bin). The final patterncodeword, thus, becomes 0000_(bin) in this mode.

Mode E

The mode has correction patterns with 1- or 2-pixel segment lengths andhas zero or one consecutive 1-pixel segments. One bit of a 4-bit patterncodeword defines whether the first segment in the row or column is a 1-or 2-pixel segment. Each of the remaining bits signals whether there arezero or one 1-pixel segment before a following 2-pixel segment. FIGS.18F and 18G illustrate two possible correction patterns according tothis mode. FIG. 18F has the correction pattern 0101010_(bin) and FIG.18G has 1101101_(bin). In FIG. 18G the first segment is a 2-pixelsegment and in FIG. 18F the first segment is a 1-pixel segment. Thefirst bits of the pattern codewords are therefore 1_(bin) and 0_(bin),respectively. There are no 1-pixel segments preceding any of the 2-pixelsegments in FIG. 18G, which can be represented by 0_(bin), 0_(bin) and0_(bin). In FIG. 18F all the 2-pixel segments have a respectivepreceding 1-pixel segment, giving 1_(bin), 1_(bin) and 1_(bin). Thefinal pattern codeword for the correction pattern of FIG. 18G istherefore 1000_(bin) and for FIG. 18F 0111_(bin).

Mode F

Mode F has correction patterns with segment lengths of 2 or 3 pixels.The first two bits of the pattern codeword represent the followingsituations. 00_(bin) is used if the first segment in the row or columnis a 1-pixel segment followed by a 2-pixel segment. 01_(bin) representsa 1-pixel segment followed by a 3-pixel segment. If the first segment isa 2-pixel segment the bit combination 10_(bin) is used and 11_(bin)defines that the first pixel segment is a 3-pixel segment. The third bitin the pattern codeword defines whether the segment(s) defined by thetwo first bits is followed by a 2- or 3-pixel segment and the fourth bitsignals with this 2- or 3-pixel segment is followed by a 2- or 3-pixelsegment.

FIGS. 18H to 18K illustrate different correction patterns for this mode.In FIG. 18H the first segment is a 2-pixel segment given 10_(bin)according to above. This 2-pixel segment is followed by two 2-pixelsegments giving 0_(bin) and 0_(bin). It does not matter whether thefinal segment is a 2-pixel segment or a 3-pixel segment as thecorrection pattern will be the same. Thus, the pattern 0101010_(bin) isrepresented by 1000_(bin).

FIG. 18I has a 1-pixel segment followed by a 2-pixel segment, resultingin 00_(bin). The following two segments are both of lengths 2 pixels (itdoes not matter whether the last segment is of two or three pixels asonly the first pixel is within the 8 pixels of the row or column). Thepattern codeword is there 0000_(bin).

FIG. 18J has a 1-pixel segment and then a 3-pixel segment. The first twobits should therefore be 01_(bin). These segments are followed by2-pixel segment. In this case the pattern codeword can be of only threebits, i.e. 010_(bin) as it does not matter whether the last two pixelsbelong to a 2-pixel segment or a 3-pixel segment. Thus, the fourth bitcan be omitted or set to an arbitrary value.

FIG. 18K has a 3-pixel segment (resulting in 11_(bin)) followed by two2-pixel segments (resulting in 0_(bin) and 0_(bin)). It is irrelevantwhether the final pixel belongs to a 2- or 3-pixel segment. Thecorrection pattern 0010101_(bin) is therefore represented by thecodeword 1100_(bin) in this mode.

Mode G

This mode relates to correction patterns with segment lengths of 3, 4 or5 pixels. In this case, all the possible correction patterns are foundin the left column of Table III below:

TABLE III pattern codewords in mode G Correction pattern Patterncodeword 1001000_(bin) 0000_(bin) 1001001_(bin) 0001_(bin) 1000100_(bin)0010_(bin) 0100100_(bin) 0011_(bin) 0100010_(bin) 0100_(bin)0010010_(bin) 0101_(bin) 0010001_(bin) 0110_(bin) 0001001_(bin)0111_(bin) 0001000_(bin) 1000_(bin) 1000010_(bin) 1001_(bin)0100001_(bin) 1010_(bin) 0010000_(bin) 1011_(bin) 0000100_(bin)1100_(bin)

As can be seen from Table III, only 13 correction patterns are possiblein this mode. Hence, four bits are sufficient to specify thesecorrection patterns, for instance using the pattern codewords proposedin the right column of Table III.

FIG. 18L illustrates the correction pattern 1001001_(bin). According toTable III, the pattern codeword is therefore 0001_(bin) in this case.FIG. 18M illustrates the correction pattern 0001000_(bin), which can berepresented by the 4-bit codeword 1000_(bin) according to Table III.

Mode H

Mode H refers to correction patterns having 5-6-, 7- or 8-pixelsegments. In Table IV below all possible correction patterns for thismode are listed in the left column:

TABLE IV pattern codewords in mode H Correction Patterns Patterncodeword 1000010_(bin) 0000_(bin) 1000001_(bin) 0001_(bin) 1000000_(bin)0010_(bin) 0100001_(bin) 0011_(bin) 0100000_(bin) 0100_(bin)0010000_(bin) 0101_(bin) 0001000_(bin) 0110_(bin) 0000100_(bin)0111_(bin) 0000010_(bin) 1000_(bin) 0000001_(bin) 1001_(bin)0000000_(bin) 1010_(bin)

As can be seen, only eleven different correction patterns are possible,and therefore they can be represented with a pattern codeword of fourbits, for instance with the bit patterns specified in the right columnof Table IV. FIG. 18M illustrates the correction pattern 0001000_(bin),which is represented by the bit pattern 0110_(bin).

1-33. (canceled)
 34. A method of compressing a block of pixels havingassociated pixel parameter values, comprising: determining a referencecodeword as a representation of a reference pixel parameter value;determining a row slope codeword as a representation of a basicparameter slope for the rows of said block; determining a column slopecodeword as a representation of a basic parameter slope for the columnsof said block; generating, for a row or a column in said block and basedon at least a portion of said pixel parameter values of said row or saidcolumn, a representation indicating pixel positions where a slope changeoccurs along said at least a portion of said row or said column;repeating said generating step for at least a portion of said rows orsaid columns in said block; determining a mode codeword as arepresentation of a set of multiple slope correction patterns, eachslope correction pattern comprising a specific, predefinedrepresentation indicating position-dependent slope correctors applicablealong a row or column; and determining, for said at least one row orcolumn in said block, a pattern codeword as a representation of a slopecorrection pattern of said set based on said position-indicatingrepresentation generated for said row or said column.
 35. The methodaccording to claim 34, wherein determining a mode codeword is performedat least partly based on said generated position-indicatingrepresentations.
 36. The method according to claim 34, wherein saidgenerating step further comprises: optionally quantizing the parametervalues of said row or said column; and subtracting, for each pixel insaid at least a portion of said row or said column, quantized parametervalue of a preceding pixel in said row or column or said referenceparameter value and said basic parameter slope for said rows or saidcolumns from a quantized parameter value of said pixel.
 37. The methodaccording to claim 34, wherein determining a mode codeword comprises:selecting a set of slope correction patterns from multiple predefinedsets; and determining said mode codeword based on said selected set. 38.The method according to claim 37, wherein said row slope codeword is arepresentation of an integer portion of the parameter slope for saidrows of said block and said column slope codeword is a representation ofan integer portion of the parameter slope for said columns of saidblock, and wherein each set of said multiple predefined sets isassociated with a range of fraction portions of the parameter slope forsaid rows or said columns of said block.
 39. The method according toclaim 34, wherein said generating step further comprises: generating,for said row or said column and based on a first portion of said pixelparameter values of said row or said column, a first representationindicating pixel positions where a slope change occurs along said firstportion of said row or said column; and generating, for said row or saidcolumn and based on a second portion of said pixel parameter values ofsaid row or said column, a second representation indicating pixelpositions where a slope change occurs along said second portion of saidrow or said column.
 40. The method according to claim 39, whereindetermining a mode codeword comprises determining, based on saidgenerated first and second position-indicating representation, a modecodeword as a representation of a set of multiple slope correctionpatterns.
 41. The method according to claim 40, wherein said patterncodeword determining step further comprises: determining, for at leastone row or column in said block, a first pattern codeword as arepresentation of a first slope correction pattern of said set based onsaid first position-indicating representation generated for said row orsaid column; and determining, for said at least one row or column insaid block, a second pattern codeword as a representation of a secondslope correction pattern of said set based on said secondposition-indicating representation generated for said row or saidcolumn.
 42. The method according to claim 39, wherein said mode codeworddetermining step further comprises: determining, based on said generatedfirst position-indicating representations, a first mode codeword as arepresentation of a first set of multiple slope correction patterns; anddetermining, based on said generated second position-indicatingrepresentations, a second mode codeword as a representation of a secondset of multiple slope correction patterns.
 43. The method according toclaim 42, wherein said pattern codeword determining step furthercomprises: determining, for at least one row or column in said block, afirst pattern codeword as a representation of a first slope correctionpattern of said first set based on said first position-indicatingrepresentation generated for said row or said column; and determining,for said at least one row or column in said block, a second patterncodeword as a representation of a second slope correction pattern ofsaid second set based on said second position-indicating representationgenerated for said row or said column.
 44. A method of decompressing apixel from a compressed pixel block, comprising: generating a referencepixel parameter value based on a reference codeword of said compressedpixel block; generating a basic parameter slope based on a slopecodeword of said compressed pixel block; providing a set of multipleslope correction patterns based on a mode codeword of said compressedpixel block, each slope correction pattern comprising a specific,predefined representation indicating position-dependent slope correctorsapplicable along a row or a column; selecting a slope correction patternfrom said provided set based on a pattern codeword associated with saidpixel and included in said compressed pixel block; and determining apixel parameter value of said pixel based on said reference pixelparameter value, said basic parameter slope and said selected slopecorrection pattern.
 45. The method according to claim 44, whereindetermining a pixel parameter value of said pixel comprises adding saidbasic parameter slope, a slope corrector selected from said slopecorrection pattern to a pixel parameter value determined for a previouspixel in said row or said column or to said reference pixel parametervalue.
 46. The method according to claim 45, further comprisingselecting said slope corrector based on a position of said pixel in saidrow or said column.
 47. The method according to claim 44, whereingenerating a basic parameter slope comprises: generating a basicparameter slope for the rows of said pixel block based on a row slopecodeword of said compressed pixel block; and generating a basicparameter slope for the columns of said pixel block based on a columnslope codeword of said compressed pixel block.
 48. The method accordingto claim 47, wherein determining a pixel parameter value comprisesdetermining said pixel value based on said reference pixel parametervalue, said basic parameter slope for said rows, said basic parameterslope for said columns, said selected slope correction pattern and atleast one slope modifier of said compressed pixel block.
 49. The methodaccording to claim 48, wherein determining a pixel parameter valuefurther comprises: adding said basic parameter slope for said columnsand said at least one slope modifier to a pixel parameter valuedetermined for a previous pixel in said column to form an intermediatevalue; and adding said basic parameter slope for said rows and a slopecorrector selected from said slope correction pattern to a pixelparameter value determined for a previous pixel in said row or to saidintermediate value.
 50. The method according to claim 48, whereindetermining a pixel parameter value further comprises: adding said basicparameter slope for said rows and said at least one slope modifier to apixel parameter value determined for a previous pixel in said row toform an intermediate value; and adding said basic parameter slope forsaid columns and a slope corrector selected from said slope correctionpattern to a pixel parameter value determined for a previous pixel insaid column or to said intermediate value.
 51. The method according toclaim 44, wherein providing a set of multiple slope correction patternscomprises providing said set from a collection of multiple predefinedsets based on said mode codeword.
 52. A compressor operative to compressa block of pixels having associated pixel parameter values, comprising:a reference quantizer operative to determine a reference codeword as arepresentation of a reference pixel parameter value; a row slopequantizer operative to determine a row slope codeword as arepresentation of a basic parameter slope for the rows of said block; acolumn slope quantizer operative to determine a column slope codeword asa representation of a basic parameter slope for the columns of saidblock; a representation generator for generating, for each row or columnin at least a portion of said block and based on at least a portion ofsaid pixel parameter values of said row or said column, a representationindicating where a slope change occurs along said at least a portion ofsaid row or said column; a mode selector operative to determine a modecodeword as a representation of a set of multiple slope correctionpatterns, each slope correction pattern is a specific, predefinedrepresentation indicating position-dependent slope correctors applicablealong a row or a column; and a pattern selector operative to determine,for said at least one row or column in said block, a pattern codeword asa representation of a slope correction pattern of said set based on saidposition-indicating representation generated for said row or saidcolumn.
 53. The compressor according to claim 52, wherein said modeselector is configured to determine said mode codeword at least partlybased on said generated position-indicating representations.
 54. Thecompressor according to claim 52, further comprising: a value quantizeroperative to quantize the parameter values of said row or said column;and a calculator operative to subtract, for each pixel in said at leasta portion of said row or said column, the quantized parameter value of apreceding pixel in said row or said column or said reference parametervalue and said basic parameter slope for said rows or said columns fromsaid quantized parameter value of said pixel.
 55. The compressoraccording to claim 52, wherein said representation generator isconfigured to i) generate, for said row or said column and based on afirst portion of said pixel parameter values of said row or said column,a first representation indicating pixel positions where a slope changeoccurs along said first portion of said row or said column; and ii)generate, for said row or said column and based on a second portion ofsaid pixel parameter values of said row or said column, a secondrepresentation indicating pixel positions where a slope change occursalong said second portion of said row or said column.
 56. The compressoraccording to claim 55, wherein said mode selector is configured todetermine, based on said generated first and second position-indicatingrepresentations, a mode codeword as a representation of a set ofmultiple slope correction patterns.
 57. The compressor according toclaim 55, wherein said pattern selector is configured to i) determine,for at least one row or column in said block, a first pattern codewordas a representation of a first slope correction pattern of said setbased on said first position-indicating representation generated forsaid row or said column; and ii) determine, for said at least one row orcolumn in said block, a second pattern codeword as a representation of asecond slope correction pattern of said set based on said secondposition-indicating representation generated for said row or saidcolumn.
 58. The compressor according to claim 57, wherein said modeselector is configured to i) determine, based on said generated firstposition-indicating representations, a first mode codeword as arepresentation of a first set of multiple slope correction patterns; andii) determine, based on said generated second position-indicatingrepresentations, a second mode codeword as a representation of a secondset of multiple slope correction patterns.
 59. The compressor accordingto claim 58, wherein said pattern selector is configured to i)determine, for at least one row or column in said block, a first patterncodeword as a representation of a first slope correction pattern of saidfirst set based on said first position-indicating representationgenerated for said row or said column; and ii) determine, for said atleast one row or column in said block, a second pattern codeword as arepresentation of a second slope correction pattern of said second setbased on said second position-indicating representation generated forsaid row or said column.
 60. A decompressor for decompressing a pixelfrom a compressed pixel block, comprising: a reference generatoroperative to generate a reference pixel parameter value based on areference codeword of said compressed pixel block; a slope generatoroperative to generate a basic parameter slope based on a slope codewordof said compressed pixel block; a set provider operative to provide aset of multiple slope correction patterns based on a mode codeword ofsaid compressed pixel block, each slope correction pattern comprising aspecific, predefined representation indicating position-dependent slopecorrectors applicable along a row or a column; a pattern selectoroperative to select a slope correction pattern from said provided setbased on a pattern codeword associated with said pixel and included insaid compressed pixel block; and a value determiner operative todetermine a pixel parameter value of said pixel based on said referencepixel parameter value, said basic parameter slope and said selectedslope correction pattern.
 61. The decompressor according to claim 60,wherein said value determiner is configured to add said basic parameterslope, a slope corrector selected from said slope correction pattern toa pixel parameter value determined for a previous pixel in said row orsaid column or to said reference pixel parameter value.
 62. Thedecompressor according to claim 61, further comprising a modifierselector operative to select said slope corrector based on a position ofsaid pixel in said row or said column.
 63. The decompressor according toclaim 60, wherein said slope generator is configured to i) generate abasic parameter slope for the rows of said pixel block based on a rowslope codeword of said compressed pixel block; and ii) generate a basicparameter slope for the columns of said pixel block based on a columnslope codeword of said compressed pixel block.
 64. The decompressoraccording to claim 63, wherein said value determiner is configured todetermine said pixel parameter value based on said reference pixelparameter value, said basic parameter slope for said rows, said basicparameter slope for said columns, said selected slope correction patternand at least one slope modifier of said compressed pixel block.
 65. Amethod of compressing a block of M×N pixels having associated pixelparameter values, comprising: determining a reference codeword as arepresentation of a reference pixel parameter value; determining a rowslope codeword as a representation of a basic parameter slope for therows of said block; determining a column slope codeword as arepresentation of a basic parameter slope for the columns of said block;and determining a modifier codeword as a representation of multipleslope modifiers applicable to at least one of said basic parameter slopefor said rows and said basic parameter slope for said columns, whereinsaid modifier codeword comprising fewer than M×N−1 bits.
 66. A signalrepresentation of a block of pixels having associated pixel parametervalues, comprising: a reference codeword as a representation of areference pixel parameter value; a row slope codeword as arepresentation of a basic parameter slope for the rows of said block; acolumn slope codeword as a representation of a basic parameter slope forthe columns of said block; a mode codeword as a representation of a setof multiple slope correction patterns, each slope correction pattern isa specific, predefined representation indicating position dependentslope correctors applicable along a row or a column; and a patterncodeword, for each row or column of said block, as a representation of aslope correction pattern of said set.